<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        // 解构 - =右侧 是什么类型 左侧就写什么类型
        let {
            name,
            songs:[a,b,c,d],
            history:[
                {
                    name:name2
                },
                {
                    name:name3
                },
                {
                    name:name4
                },
            ],
            age,
        } = {
            name: '王菲',
            age: 18,
            songs: ['红豆', '流年', '暧昧', '传奇'],
            history: [
                { name: '窦唯' },
                { name: '李亚鹏' },
                { name: '谢霆锋' }
            ]
        };

        console.log(name);
        console.log(age);
        // console.log(songs);

        console.log(a);
        console.log(b);
        console.log(c);
        console.log(d);

        console.log(name2);
        console.log(name3);
        console.log(name4);


        






    </script>
</body>

</html>